<?php

namespace App\Requests;

class FeedbackRequest extends BaseFormRequest
{
    public function rules()
    {
        $request_key = $this->getMethod() . $this->getRequestUri();
        switch ($request_key) {
            case 'POST/api/feedback':
                return [
                    'content' => 'required|string',
                    'photos' => 'nullable|array',
                    'photos.*' => 'nullable|url'
                ];
                break;
            case 'POST/api/feedback.search':
                return [
                    'query_string' => 'present|string'
                ];
            default:
                return [];
        }
    }
}